(function(){function nt(){"use strict";nt=function(){return g};var h,g={},P=Object.prototype,y=P.hasOwnProperty,Q=Object.defineProperty||function(C,O,T){C[O]=T.value},ue=typeof Symbol=="function"?Symbol:{},oe=ue.iterator||"@@iterator",Ee=ue.asyncIterator||"@@asyncIterator",ne=ue.toStringTag||"@@toStringTag";function N(C,O,T){return Object.defineProperty(C,O,{value:T,enumerable:!0,configurable:!0,writable:!0}),C[O]}try{N({},"")}catch(C){N=function(T,_,V){return T[_]=V}}function Xe(C,O,T,_){var V=O&&O.prototype instanceof ht?O:ht,A=Object.create(V.prototype),ee=new Ye(_||[]);return Q(A,"_invoke",{value:Le(C,T,ee)}),A}function qe(C,O,T){try{return{type:"normal",arg:C.call(O,T)}}catch(_){return{type:"throw",arg:_}}}g.wrap=Xe;var Be="suspendedStart",jt="suspendedYield",Nt="executing",ot="completed",Me={};function ht(){}function me(){}function je(){}var st={};N(st,oe,function(){return this});var at=Object.getPrototypeOf,Je=at&&at(at(gt([])));Je&&Je!==P&&y.call(Je,oe)&&(st=Je);var Ke=je.prototype=ht.prototype=Object.create(st);function _t(C){["next","throw","return"].forEach(function(O){N(C,O,function(T){return this._invoke(O,T)})})}function Ze(C,O){function T(V,A,ee,se){var Se=qe(C[V],C,A);if(Se.type!=="throw"){var U=Se.arg,Ge=U.value;return Ge&&xe(Ge)=="object"&&y.call(Ge,"__await")?O.resolve(Ge.__await).then(function(m){T("next",m,ee,se)},function(m){T("throw",m,ee,se)}):O.resolve(Ge).then(function(m){U.value=m,ee(U)},function(m){return T("throw",m,ee,se)})}se(Se.arg)}var _;Q(this,"_invoke",{value:function(A,ee){function se(){return new O(function(Se,U){T(A,ee,Se,U)})}return _=_?_.then(se,se):se()}})}function Le(C,O,T){var _=Be;return function(V,A){if(_===Nt)throw Error("Generator is already running");if(_===ot){if(V==="throw")throw A;return{value:h,done:!0}}for(T.method=V,T.arg=A;;){var ee=T.delegate;if(ee){var se=$e(ee,T);if(se){if(se===Me)continue;return se}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(_===Be)throw _=ot,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);_=Nt;var Se=qe(C,O,T);if(Se.type==="normal"){if(_=T.done?ot:jt,Se.arg===Me)continue;return{value:Se.arg,done:T.done}}Se.type==="throw"&&(_=ot,T.method="throw",T.arg=Se.arg)}}}function $e(C,O){var T=O.method,_=C.iterator[T];if(_===h)return O.delegate=null,T==="throw"&&C.iterator.return&&(O.method="return",O.arg=h,$e(C,O),O.method==="throw")||T!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+T+"' method")),Me;var V=qe(_,C.iterator,O.arg);if(V.type==="throw")return O.method="throw",O.arg=V.arg,O.delegate=null,Me;var A=V.arg;return A?A.done?(O[C.resultName]=A.value,O.next=C.nextLoc,O.method!=="return"&&(O.method="next",O.arg=h),O.delegate=null,Me):A:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,Me)}function et(C){var O={tryLoc:C[0]};1 in C&&(O.catchLoc=C[1]),2 in C&&(O.finallyLoc=C[2],O.afterLoc=C[3]),this.tryEntries.push(O)}function ut(C){var O=C.completion||{};O.type="normal",delete O.arg,C.completion=O}function Ye(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(et,this),this.reset(!0)}function gt(C){if(C||C===""){var O=C[oe];if(O)return O.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var T=-1,_=function V(){for(;++T=0;--V){var A=this.tryEntries[V],ee=A.completion;if(A.tryLoc==="root")return _("end");if(A.tryLoc<=this.prev){var se=y.call(A,"catchLoc"),Se=y.call(A,"finallyLoc");if(se&&Se){if(this.prev=0;--_){var V=this.tryEntries[_];if(V.tryLoc<=this.prev&&y.call(V,"finallyLoc")&&this.prev=0;--T){var _=this.tryEntries[T];if(_.finallyLoc===O)return this.complete(_.completion,_.afterLoc),ut(_),Me}},catch:function(O){for(var T=this.tryEntries.length-1;T>=0;--T){var _=this.tryEntries[T];if(_.tryLoc===O){var V=_.completion;if(V.type==="throw"){var A=V.arg;ut(_)}return A}}throw Error("illegal catch attempt")},delegateYield:function(O,T,_){return this.delegate={iterator:gt(O),resultName:T,nextLoc:_},this.method==="next"&&(this.arg=h),Me}},g}function hn(h,g,P,y,Q,ue,oe){try{var Ee=h[ue](oe),ne=Ee.value}catch(N){return void P(N)}Ee.done?g(ne):Promise.resolve(ne).then(y,Q)}function Jt(h){return function(){var g=this,P=arguments;return new Promise(function(y,Q){var ue=h.apply(g,P);function oe(ne){hn(ue,y,Q,oe,Ee,"next",ne)}function Ee(ne){hn(ue,y,Q,oe,Ee,"throw",ne)}oe(void 0)})}}function le(h,g,P,y){var Q=Zt(rt(1&y?h.prototype:h),g,P);return 2&y&&typeof Q=="function"?function(ue){return Q.apply(P,ue)}:Q}function Zt(){return Zt=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(h,g,P){var y=rr(h,g);if(y){var Q=Object.getOwnPropertyDescriptor(y,g);return Q.get?Q.get.call(arguments.length<3?h:P):Q.value}},Zt.apply(null,arguments)}function rr(h,g){for(;!{}.hasOwnProperty.call(h,g)&&(h=rt(h))!==null;);return h}function or(h,g){return ur(h)||ar(h,g)||nn(h,g)||sr()}function sr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ar(h,g){var P=h==null?null:typeof Symbol!="undefined"&&h[Symbol.iterator]||h["@@iterator"];if(P!=null){var y,Q,ue,oe,Ee=[],ne=!0,N=!1;try{if(ue=(P=P.call(h)).next,g===0){if(Object(P)!==P)return;ne=!1}else for(;!(ne=(y=ue.call(P)).done)&&(Ee.push(y.value),Ee.length!==g);ne=!0);}catch(Xe){N=!0,Q=Xe}finally{try{if(!ne&&P.return!=null&&(oe=P.return(),Object(oe)!==oe))return}finally{if(N)throw Q}}return Ee}}function ur(h){if(Array.isArray(h))return h}function it(h){var g=typeof Map=="function"?new Map:void 0;return it=function(y){if(y===null||!dr(y))return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(g!==void 0){if(g.has(y))return g.get(y);g.set(y,Q)}function Q(){return cr(y,arguments,rt(this).constructor)}return Q.prototype=Object.create(y.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),Tt(Q,y)},it(h)}function cr(h,g,P){if(tn())return Reflect.construct.apply(null,arguments);var y=[null];y.push.apply(y,g);var Q=new(h.bind.apply(h,y));return P&&Tt(Q,P.prototype),Q}function dr(h){try{return Function.toString.call(h).indexOf("[native code]")!==-1}catch(g){return typeof h=="function"}}function be(h){return Er(h)||Sr(h)||nn(h)||lr()}function lr(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sr(h){if(typeof Symbol!="undefined"&&h[Symbol.iterator]!=null||h["@@iterator"]!=null)return Array.from(h)}function Er(h){if(Array.isArray(h))return en(h)}function v(h,g,P){return g=rt(g),hr(h,tn()?Reflect.construct(g,P||[],rt(h).constructor):g.apply(h,P))}function hr(h,g){if(g&&(xe(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p(h)}function p(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function tn(){try{var h=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(g){}return(tn=function(){return!!h})()}function rt(h){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},rt(h)}function f(h,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(g&&g.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),g&&Tt(h,g)}function Tt(h,g){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,y){return P.__proto__=y,P},Tt(h,g)}function _n(h,g){for(var P=0;P=h.length?{done:!0}:{done:!1,value:h[y++]}},e:function(N){throw N},f:Q}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var ue,oe=!0,Ee=!1;return{s:function(){P=P.call(h)},n:function(){var N=P.next();return oe=N.done,N},e:function(N){Ee=!0,ue=N},f:function(){try{oe||P.return==null||P.return()}finally{if(Ee)throw ue}}}}function nn(h,g){if(h){if(typeof h=="string")return en(h,g);var P={}.toString.call(h).slice(8,-1);return P==="Object"&&h.constructor&&(P=h.constructor.name),P==="Map"||P==="Set"?Array.from(h):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?en(h,g):void 0}}function en(h,g){(g==null||g>h.length)&&(g=h.length);for(var P=0,y=Array(g);P. parameter required");var e=this.parameter.split(".");if(e.length!=2)throw new Error("Field name must be in the format
.");var n=e[0],o=e[1],s=this.cmpApiContext.gppModel.getFieldValue(n,o);this.invokeCallback(s)}}])}(Be),Me=function(r){function i(){return l(this,i),v(this,i,arguments)}return f(i,r),d(i,[{key:"respond",value:function(){if(!this.parameter||this.parameter.length===0)throw new Error("
parameter required");var e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}])}(Be),ht=function(r){function i(){return l(this,i),v(this,i,arguments)}return f(i,r),d(i,[{key:"respond",value:function(){if(!this.parameter||this.parameter.length===0)throw new Error("
[.version] parameter required");var e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}])}(Be),me;(function(r){r.ADD_EVENT_LISTENER="addEventListener",r.GET_FIELD="getField",r.GET_SECTION="getSection",r.HAS_SECTION="hasSection",r.PING="ping",r.REMOVE_EVENT_LISTENER="removeEventListener"})(me||(me={}));var je=function(r){function i(){return l(this,i),v(this,i,arguments)}return f(i,r),d(i,[{key:"respond",value:function(){var e=this.parameter,n=this.cmpApiContext.eventQueue.remove(e),o=new Xe("listenerRemoved",e,n,new qe(this.cmpApiContext));this.invokeCallback(o)}}])}(Be),st,at,Je,Ke,_t,Ze,Le=d(function r(){l(this,r)});st=me.ADD_EVENT_LISTENER,at=me.GET_FIELD,Je=me.GET_SECTION,Ke=me.HAS_SECTION,_t=me.PING,Ze=me.REMOVE_EVENT_LISTENER,N(Le,st,jt),N(Le,at,ot),N(Le,Je,Me),N(Le,Ke,ht),N(Le,_t,Nt),N(Le,Ze,je);var $e;(function(r){r.STUB="stub",r.LOADING="loading",r.LOADED="loaded",r.ERROR="error"})($e||($e={}));var et;(function(r){r.VISIBLE="visible",r.HIDDEN="hidden",r.DISABLED="disabled"})(et||(et={}));var ut;(function(r){r.GPP_LOADED="gpploaded",r.CMP_UI_SHOWN="cmpuishown",r.USER_ACTION_COMPLETE="useractioncomplete"})(ut||(ut={}));var Ye;(function(r){r.NOT_READY="not ready",r.READY="ready"})(Ye||(Ye={}));var gt=function(){function r(i,t){if(l(this,r),S(this,"callQueue",void 0),S(this,"customCommands",void 0),S(this,"cmpApiContext",void 0),this.cmpApiContext=i,t){var e=me.ADD_EVENT_LISTENER;if(t!=null&&t[e])throw new Error("Built-In Custom Commmand for ".concat(e," not allowed"));if(e=me.REMOVE_EVENT_LISTENER,t!=null&&t[e])throw new Error("Built-In Custom Commmand for ".concat(e," not allowed"));this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch(n){this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}return d(r,[{key:"apiCall",value:function(t,e,n,o){if(typeof t!="string")e(null,!1);else{if(e&&typeof e!="function")throw new Error("invalid callback function");this.isCustomCommand(t)?this.customCommands[t](e,n):this.isBuiltInCommand(t)?new Le[t](this.cmpApiContext,e,n).execute():e&&e(null,!1)}}},{key:"purgeQueuedCalls",value:function(){var t=this.callQueue;this.callQueue=[],t.forEach(function(e){var n;(n=window).__gpp.apply(n,be(e))})}},{key:"isCustomCommand",value:function(t){return this.customCommands&&typeof this.customCommands[t]=="function"}},{key:"isBuiltInCommand",value:function(t){return Le[t]!==void 0}}])}(),C=function(){function r(i){l(this,r),S(this,"eventQueue",new Map),S(this,"queueNumber",1e3),S(this,"cmpApiContext",void 0),this.cmpApiContext=i;try{for(var t=window.__gpp("events")||[],e=0;e=1)for(n.push(1);t>=n[0]*2;)n.unshift(n[0]*2);for(var o="",s=0;s=a?(o+="1",t-=a):o+="0"}if(o.length>e)throw new V("Numeric value '"+t+"' is too large for a bit string length of '"+e+"'");for(;o.length0;)e+="0";for(;e.length%6>0;)e+="0";return e}}],[{key:"getInstance",value:function(){return this.instance}}])}(se),U=Se;N(U,"instance",new Se);var Ge=function(){function r(){l(this,r)}return d(r,[{key:"encode",value:function(t,e){for(var n="",o=0;o=1&&(e.push(1),t>=2)){e.push(2);for(var n=2;t>=e[n-1]+e[n-2];)e.push(e[n-1]+e[n-2]),n++}for(var o="1",s=e.length-1;s>=0;s--){var a=e[s];t>=a?(o="1"+o,t-=a):o="0"+o}return o}},{key:"decode",value:function(t){if(!/^[0-1]*$/.test(t)||t.length<2||t.indexOf("11")!==t.length-2)throw new _("Undecodable FibonacciInteger '"+t+"'");for(var e=0,n=[],o=0;o0&&arguments[0]!==void 0?arguments[0]:!0;l(this,r),S(this,"hardFailIfMissing",void 0),S(this,"validator",void 0),S(this,"value",void 0),this.hardFailIfMissing=i}return d(r,[{key:"withValidator",value:function(t){return this.validator=t,this}},{key:"hasValue",value:function(){return this.value!==void 0&&this.value!==null}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(t){if(!this.validator||this.validator.test(t))this.value=t;else throw new Tn("Invalid value '"+t+"'")}},{key:"getHardFailIfMissing",value:function(){return this.hardFailIfMissing}}])}(),Ue=function(r){function i(t){var e;return l(this,i),e=v(this,i,[t]),e.name="SubstringError",e}return f(i,r),d(i)}(_),ae=function(){function r(){l(this,r)}return d(r,null,[{key:"substring",value:function(t,e,n){if(n>t.length||e<0||e>n)throw new Ue("Invalid substring indexes "+e+":"+n+" for string of length "+t.length);return t.substring(e,n)}}])}(),Nn=function(r){function i(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return l(this,i),e=v(this,i,[n]),e.setValue(t),e}return f(i,r),d(i,[{key:"encode",value:function(){try{return rn.encode(this.value)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=rn.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{for(var o=A.decode(ae.substring(e,n,n+12)),s=n+12,a=0;a2&&arguments[2]!==void 0?arguments[2]:!0;return l(this,i),n=v(this,i,[o]),S(p(n),"bitStringLength",void 0),n.bitStringLength=t,n.setValue(e),n}return f(i,r),d(i,[{key:"encode",value:function(){try{return A.encode(this.value,this.bitStringLength)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=A.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+this.bitStringLength)}catch(o){throw new Ue(o)}}}])}(ke),k=function(){function r(){l(this,r),S(this,"fields",new Map)}return d(r,[{key:"containsKey",value:function(t){return this.fields.has(t)}},{key:"put",value:function(t,e){this.fields.set(t,e)}},{key:"get",value:function(t){return this.fields.get(t)}},{key:"getAll",value:function(){return new Map(this.fields)}},{key:"reset",value:function(t){var e=this;this.fields.clear(),t.getAll().forEach(function(n,o){e.fields.set(o,n)})}}])}(),We;(function(r){r.ID="Id",r.VERSION="Version",r.SECTION_IDS="SectionIds"})(We||(We={}));var On=[We.ID,We.VERSION,We.SECTION_IDS],G=function(){function r(){l(this,r),S(this,"fields",void 0),S(this,"encodedString",null),S(this,"dirty",!1),S(this,"decoded",!0),this.fields=this.initializeFields()}return d(r,[{key:"validate",value:function(){}},{key:"hasField",value:function(t){return this.fields.containsKey(t)}},{key:"getFieldValue",value:function(t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(t))return this.fields.get(t).getValue();throw new O("Invalid field: '"+t+"'")}},{key:"setFieldValue",value:function(t,e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(t))this.fields.get(t).setValue(e),this.dirty=!0;else throw new O(t+" not found")}},{key:"toObj",value:function(){for(var t={},e=this.getFieldNames(),n=0;n0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Ot.ID}},{key:"getName",value:function(){return Ot.NAME}},{key:"getVersion",value:function(){return Ot.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new In),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;ss&&n[s].decode(o[s]);return n}},{key:"encodeSection",value:function(e){for(var n=[],o=0;o0;)e+="0";return e}}],[{key:"getInstance",value:function(){return this.instance}}])}(se),lt=on;N(lt,"instance",new on);var St=function(){function r(){l(this,r)}return d(r,null,[{key:"encode",value:function(t){t.sort(function(E,c){return E-c});for(var e=[],n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return l(this,i),e=v(this,i,[n]),e.setValue(t),e}return f(i,r),d(i,[{key:"encode",value:function(){try{return St.encode(this.value)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=St.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{for(var o=A.decode(ae.substring(e,n,n+12)),s=n+12,a=0;a3&&arguments[3]!==void 0?arguments[3]:!0;return l(this,i),o=v(this,i,[s]),S(p(o),"keyBitStringLength",void 0),S(p(o),"typeBitStringLength",void 0),o.keyBitStringLength=t,o.typeBitStringLength=e,o.setValue(n),o}return f(i,r),d(i,[{key:"encode",value:function(){try{var e=this.value,n="";n+=A.encode(e.length,12);for(var o=0;o1&&arguments[1]!==void 0?arguments[1]:!0;return l(this,i),e=v(this,i,[n]),e.setValue(t),e}return f(i,r),d(i,[{key:"encode",value:function(){try{return dt.encode(this.value)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=dt.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+1)}catch(o){throw new Ue(o)}}}])}(ke),an=function(){function r(){l(this,r)}return d(r,null,[{key:"encode",value:function(t){return t?A.encode(Math.round(t.getTime()/100),36):A.encode(0,36)}},{key:"decode",value:function(t){if(!/^[0-1]*$/.test(t)||t.length!==36)throw new _("Undecodable Datetime '"+t+"'");return new Date(A.decode(t)*100)}}])}(),It=function(r){function i(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return l(this,i),e=v(this,i,[n]),e.setValue(t),e}return f(i,r),d(i,[{key:"encode",value:function(){try{return an.encode(this.value)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=an.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+36)}catch(o){throw new Ue(o)}}}])}(ke),Et=function(){function r(){l(this,r)}return d(r,null,[{key:"encode",value:function(t,e){if(t.length>e)throw new V("Too many values '"+t.length+"'");for(var n="",o=0;o1&&arguments[1]!==void 0?arguments[1]:!0;return l(this,i),e=v(this,i,[n]),S(p(e),"numElements",void 0),e.numElements=t.length,e.setValue(t),e}return f(i,r),d(i,[{key:"encode",value:function(){try{return Et.encode(this.value,this.numElements)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=Et.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+this.numElements)}catch(o){throw new Ue(o)}}},{key:"getValue",value:function(){return be(le(i,"getValue",this,3)([]))}},{key:"setValue",value:function(e){for(var n=be(e),o=n.length;othis.numElements&&(n=n.slice(0,this.numElements)),le(i,"setValue",this,3)([n])}}])}(ke),un=function(){function r(){l(this,r)}return d(r,null,[{key:"encode",value:function(t,e){for(;t.length=65)n+=A.encode(t.charCodeAt(o)-65,6);else throw new V("Unencodable FixedString '"+t+"'")}return n}},{key:"decode",value:function(t){if(!/^[0-1]*$/.test(t)||t.length%6!==0)throw new _("Undecodable FixedString '"+t+"'");for(var e="",n=0;n2&&arguments[2]!==void 0?arguments[2]:!0;return l(this,i),n=v(this,i,[o]),S(p(n),"stringLength",void 0),n.stringLength=t,n.setValue(e),n}return f(i,r),d(i,[{key:"encode",value:function(){try{return un.encode(this.value,this.stringLength)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=un.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+this.stringLength*6)}catch(o){throw new Ue(o)}}}])}(ke),tt=function(r){function i(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return l(this,i),e=v(this,i,[n]),e.setValue(t),e}return f(i,r),d(i,[{key:"encode",value:function(){try{var e=this.value.length>0?this.value[this.value.length-1]:0,n=St.encode(this.value),o=n.length,s=e;if(o<=s)return A.encode(e,16)+"1"+n;{for(var a=[],E=0,c=0;c2&&arguments[2]!==void 0?arguments[2]:!0;return l(this,i),n=v(this,i,[o]),S(p(n),"getLength",void 0),n.getLength=t,n.setValue(e),n}return f(i,r),d(i,[{key:"encode",value:function(){try{return Et.encode(this.value,this.getLength())}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=Et.decode(e)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+this.getLength())}catch(o){throw new Ue(o)}}},{key:"getValue",value:function(){return be(le(i,"getValue",this,3)([]))}},{key:"setValue",value:function(e){for(var n=this.getLength(),o=be(e),s=o.length;sn&&(o=o.slice(0,n)),le(i,"setValue",this,3)([be(o)])}}])}(ke),Dn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",lt.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return fn}},{key:"initializeFields",value:function(){var e=new k;e.put(D.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new u(3,3)),e.put(D.PUBLISHER_CONSENTS.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(D.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));var n=new u(6,0);return e.put(D.NUM_CUSTOM_PURPOSES.toString(),n),e.put(D.PUBLISHER_CUSTOM_CONSENTS.toString(),new vt(function(){return n.getValue()},[])),e.put(D.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new vt(function(){return n.getValue()},[])),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}])}(G),wn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",lt.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return pn}},{key:"initializeFields",value:function(){var e=new k;return e.put(D.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new u(3,2)),e.put(D.VENDORS_ALLOWED.toString(),new tt([])),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}])}(G),Vn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",lt.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return An}},{key:"initializeFields",value:function(){var e=new k;return e.put(D.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new u(3,1)),e.put(D.VENDORS_DISCLOSED.toString(),new tt([])),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}])}(G),ft=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return ft.ID}},{key:"getName",value:function(){return ft.NAME}},{key:"getVersion",value:function(){return ft.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Pn),e.push(new Dn),e.push(new wn),e.push(new Vn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;s="A"&&E<="H")n[0].decode(o[s]);else if(E>="I"&&E<="P")n[3].decode(o[s]);else if(E>="Q"&&E<="X")n[2].decode(o[s]);else if(E>="Y"&&E<="Z"||E>="a"&&E<="f")n[1].decode(o[s]);else throw new _("Unable to decode TcfEuV2 segment '"+a+"'")}}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),this.getFieldValue(D.IS_SERVICE_SPECIFIC)?e.length>=2&&n.push(e[1].encode()):e.length>=2&&(n.push(e[2].encode()),e.length>=3&&n.push(e[3].encode()))),n.join(".")}},{key:"setFieldValue",value:function(e,n){if(le(i,"setFieldValue",this,3)([e,n]),e!==D.CREATED&&e!==D.LAST_UPDATED){var o=new Date;le(i,"setFieldValue",this,3)([D.CREATED,o]),le(i,"setFieldValue",this,3)([D.LAST_UPDATED,o])}}}])}(T),ce=ft;N(ce,"ID",2),N(ce,"VERSION",2),N(ce,"NAME","tcfeuv2");var R;(function(r){r.VERSION="Version",r.CREATED="Created",r.LAST_UPDATED="LastUpdated",r.CMP_ID="CmpId",r.CMP_VERSION="CmpVersion",r.CONSENT_SCREEN="ConsentScreen",r.CONSENT_LANGUAGE="ConsentLanguage",r.VENDOR_LIST_VERSION="VendorListVersion",r.TCF_POLICY_VERSION="TcfPolicyVersion",r.USE_NON_STANDARD_STACKS="UseNonStandardStacks",r.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",r.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",r.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",r.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",r.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",r.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",r.PUB_RESTRICTIONS="PubRestrictions",r.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",r.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",r.NUM_CUSTOM_PURPOSES="NumCustomPurposes",r.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",r.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",r.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",r.DISCLOSED_VENDORS="DisclosedVendors"})(R||(R={}));var yn=[R.VERSION,R.CREATED,R.LAST_UPDATED,R.CMP_ID,R.CMP_VERSION,R.CONSENT_SCREEN,R.CONSENT_LANGUAGE,R.VENDOR_LIST_VERSION,R.TCF_POLICY_VERSION,R.USE_NON_STANDARD_STACKS,R.SPECIAL_FEATURE_EXPRESS_CONSENT,R.PURPOSES_EXPRESS_CONSENT,R.PURPOSES_IMPLIED_CONSENT,R.VENDOR_EXPRESS_CONSENT,R.VENDOR_IMPLIED_CONSENT,R.PUB_RESTRICTIONS],Rn=[R.PUB_PURPOSES_SEGMENT_TYPE,R.PUB_PURPOSES_EXPRESS_CONSENT,R.PUB_PURPOSES_IMPLIED_CONSENT,R.NUM_CUSTOM_PURPOSES,R.CUSTOM_PURPOSES_EXPRESS_CONSENT,R.CUSTOM_PURPOSES_IMPLIED_CONSENT],mn=[R.DISCLOSED_VENDORS_SEGMENT_TYPE,R.DISCLOSED_VENDORS],Mn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return yn}},{key:"initializeFields",value:function(){var e=new Date,n=new k;return n.put(R.VERSION.toString(),new u(6,he.VERSION)),n.put(R.CREATED.toString(),new It(e)),n.put(R.LAST_UPDATED.toString(),new It(e)),n.put(R.CMP_ID.toString(),new u(12,0)),n.put(R.CMP_VERSION.toString(),new u(12,0)),n.put(R.CONSENT_SCREEN.toString(),new u(6,0)),n.put(R.CONSENT_LANGUAGE.toString(),new Yt(2,"EN")),n.put(R.VENDOR_LIST_VERSION.toString(),new u(12,0)),n.put(R.TCF_POLICY_VERSION.toString(),new u(6,2)),n.put(R.USE_NON_STANDARD_STACKS.toString(),new $(!1)),n.put(R.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),n.put(R.PURPOSES_EXPRESS_CONSENT.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),n.put(R.PURPOSES_IMPLIED_CONSENT.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),n.put(R.VENDOR_EXPRESS_CONSENT.toString(),new tt([])),n.put(R.VENDOR_IMPLIED_CONSENT.toString(),new tt([])),n.put(R.PUB_RESTRICTIONS.toString(),new sn(6,2,[],!1)),n}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}])}(G),Un=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Rn}},{key:"initializeFields",value:function(){var e=new k;e.put(R.PUB_PURPOSES_SEGMENT_TYPE.toString(),new u(3,3)),e.put(R.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(R.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new ze([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));var n=new u(6,0);return e.put(R.NUM_CUSTOM_PURPOSES.toString(),n),e.put(R.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new vt(function(){return n.getValue()},[])),e.put(R.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new vt(function(){return n.getValue()},[])),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}])}(G),Gn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",lt.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return mn}},{key:"initializeFields",value:function(){var e=new k;return e.put(R.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new u(3,1)),e.put(R.DISCLOSED_VENDORS.toString(),new tt([])),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}])}(G),pt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return pt.ID}},{key:"getName",value:function(){return pt.NAME}},{key:"getVersion",value:function(){return pt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Mn),e.push(new Un),e.push(new Gn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;s="A"&&E<="H")n[0].decode(o[s]);else if(E>="I"&&E<="P")n[2].decode(o[s]);else if(E>="Y"&&E<="Z"||E>="a"&&E<="f")n[1].decode(o[s]);else throw new _("Unable to decode TcfCaV1 segment '"+a+"'")}}return n}},{key:"encodeSection",value:function(e){var n=[];return n.push(e[0].encode()),n.push(e[1].encode()),this.getFieldValue(R.DISCLOSED_VENDORS).length>0&&n.push(e[2].encode()),n.join(".")}},{key:"setFieldValue",value:function(e,n){if(le(i,"setFieldValue",this,3)([e,n]),e!==R.CREATED&&e!==R.LAST_UPDATED){var o=new Date;le(i,"setFieldValue",this,3)([R.CREATED,o]),le(i,"setFieldValue",this,3)([R.LAST_UPDATED,o])}}}])}(T),he=pt;N(he,"ID",5),N(he,"VERSION",1),N(he,"NAME","tcfcav1");var Wt=function(){function r(i,t){l(this,r),S(this,"validator",void 0),S(this,"value",null),t?this.validator=t:this.validator=new(function(){function e(){l(this,e)}return d(e,[{key:"test",value:function(o){return!0}}])}()),this.setValue(i)}return d(r,[{key:"hasValue",value:function(){return this.value!=null}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(t){t?this.value=t.charAt(0):t=null}}])}(),kn=function(){function r(i,t){l(this,r),S(this,"validator",void 0),S(this,"value",null),t?this.validator=t:this.validator=new(function(){function e(){l(this,e)}return d(e,[{key:"test",value:function(o){return!0}}])}()),this.setValue(i)}return d(r,[{key:"hasValue",value:function(){return this.value!=null}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(t){this.value=t}}])}(),bn=function(){function r(){l(this,r),S(this,"fields",new Map)}return d(r,[{key:"containsKey",value:function(t){return this.fields.has(t)}},{key:"put",value:function(t,e){this.fields.set(t,e)}},{key:"get",value:function(t){return this.fields.get(t)}},{key:"getAll",value:function(){return new Map(this.fields)}},{key:"reset",value:function(t){var e=this;this.fields.clear(),t.getAll().forEach(function(n,o){e.fields.set(o,n)})}}])}(),de;(function(r){r.VERSION="Version",r.NOTICE="Notice",r.OPT_OUT_SALE="OptOutSale",r.LSPA_COVERED="LspaCovered"})(de||(de={}));var Ln=[de.VERSION,de.NOTICE,de.OPT_OUT_SALE,de.LSPA_COVERED],Fn=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Ln}},{key:"initializeFields",value:function(){var e=new(function(){function o(){l(this,o)}return d(o,[{key:"test",value:function(a){return a==="-"||a==="Y"||a==="N"}}])}()),n=new bn;return n.put(de.VERSION,new kn(_e.VERSION)),n.put(de.NOTICE,new Wt("-",e)),n.put(de.OPT_OUT_SALE,new Wt("-",e)),n.put(de.LSPA_COVERED,new Wt("-",e)),n}},{key:"encodeSegment",value:function(e){var n="";return n+=e.get(de.VERSION).getValue(),n+=e.get(de.NOTICE).getValue(),n+=e.get(de.OPT_OUT_SALE).getValue(),n+=e.get(de.LSPA_COVERED).getValue(),n}},{key:"decodeSegment",value:function(e,n){if(e==null||e.length!=4)throw new _("Unable to decode UspV1CoreSegment '"+e+"'");try{n.get(de.VERSION).setValue(parseInt(e.substring(0,1))),n.get(de.NOTICE).setValue(e.charAt(1)),n.get(de.OPT_OUT_SALE).setValue(e.charAt(2)),n.get(de.LSPA_COVERED).setValue(e.charAt(3))}catch(o){throw new _("Unable to decode UspV1CoreSegment '"+e+"'")}}}])}(G),At=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return At.ID}},{key:"getName",value:function(){return At.NAME}},{key:"getVersion",value:function(){return At.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Fn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;ss&&n[s].decode(o[s]);return n}},{key:"encodeSection",value:function(e){for(var n=[],o=0;on)throw new V("Too many values '"+t.length+"'");for(var o="",s=0;se*n)throw new _("Undecodable FixedIntegerList '"+t+"'");if(t.length%e!=0)throw new _("Undecodable FixedIntegerList '"+t+"'");for(;t.lengthe*n&&(t=t.substring(0,e*n));for(var o=[],s=0;s2&&arguments[2]!==void 0?arguments[2]:!0;return l(this,i),n=v(this,i,[o]),S(p(n),"elementBitStringLength",void 0),S(p(n),"numElements",void 0),n.elementBitStringLength=t,n.numElements=e.length,n.setValue(e),n}return f(i,r),d(i,[{key:"encode",value:function(){try{return cn.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new V(e)}}},{key:"decode",value:function(e){try{this.value=cn.decode(e,this.elementBitStringLength,this.numElements)}catch(n){throw new _(n)}}},{key:"substring",value:function(e,n){try{return ae.substring(e,n,n+this.elementBitStringLength*this.numElements)}catch(o){throw new Ue(o)}}},{key:"getValue",value:function(){return be(le(i,"getValue",this,3)([]))}},{key:"setValue",value:function(e){for(var n=be(e),o=n.length;othis.numElements&&(n=n.slice(0,this.numElements)),le(i,"setValue",this,3)([n])}}])}(ke),xn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return zn}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(M.VERSION.toString(),new u(6,ge.VERSION)),s.put(M.SHARING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(M.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(M.SHARING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(M.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(M.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(M.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(M.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(M.SHARING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(M.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(M.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(o)),s.put(M.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0]).withValidator(o)),s.put(M.PERSONAL_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(M.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(M.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(M.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);o.length==66&&(o=o.substring(0,48)+"00000000"+o.substring(48,52)+"00"+o.substring(52,62)),this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNatCoreSegment '"+e+"'")}}}])}(G),Bn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Hn}},{key:"initializeFields",value:function(){var e=new k;return e.put(M.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(M.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(M.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNatGpcSegment '"+e+"'")}}}])}(G),Ct=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Ct.ID}},{key:"getName",value:function(){return Ct.NAME}},{key:"getVersion",value:function(){return Ct.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new xn),e.push(new Bn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(M.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(M.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),ge=Ct;N(ge,"ID",7),N(ge,"VERSION",1),N(ge,"NAME","usnat");var L;(function(r){r.VERSION="Version",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",r.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",r.SALE_OPT_OUT="SaleOptOut",r.SHARING_OPT_OUT="SharingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.PERSONAL_DATA_CONSENTS="PersonalDataConsents",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(L||(L={}));var jn=[L.VERSION,L.SALE_OPT_OUT_NOTICE,L.SHARING_OPT_OUT_NOTICE,L.SENSITIVE_DATA_LIMIT_USE_NOTICE,L.SALE_OPT_OUT,L.SHARING_OPT_OUT,L.SENSITIVE_DATA_PROCESSING,L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,L.PERSONAL_DATA_CONSENTS,L.MSPA_COVERED_TRANSACTION,L.MSPA_OPT_OUT_OPTION_MODE,L.MSPA_SERVICE_PROVIDER_MODE],Kn=[L.GPC_SEGMENT_TYPE,L.GPC],Yn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return jn}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(L.VERSION.toString(),new u(6,Te.VERSION)),s.put(L.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(L.SHARING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(L.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(L.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(L.SHARING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(L.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0,0]).withValidator(o)),s.put(L.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0]).withValidator(o)),s.put(L.PERSONAL_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(L.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(L.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(L.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsCaCoreSegment '"+e+"'")}}}])}(G),Wn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Kn}},{key:"initializeFields",value:function(){var e=new k;return e.put(L.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(L.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(L.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsCaGpcSegment '"+e+"'")}}}])}(G),Pt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Pt.ID}},{key:"getName",value:function(){return Pt.NAME}},{key:"getVersion",value:function(){return Pt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Yn),e.push(new Wn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(L.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(L.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Te=Pt;N(Te,"ID",8),N(Te,"VERSION",1),N(Te,"NAME","usca");var ie;(function(r){r.VERSION="Version",r.SHARING_NOTICE="SharingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(ie||(ie={}));var Qn=[ie.VERSION,ie.SHARING_NOTICE,ie.SALE_OPT_OUT_NOTICE,ie.TARGETED_ADVERTISING_OPT_OUT_NOTICE,ie.SALE_OPT_OUT,ie.TARGETED_ADVERTISING_OPT_OUT,ie.SENSITIVE_DATA_PROCESSING,ie.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,ie.MSPA_COVERED_TRANSACTION,ie.MSPA_OPT_OUT_OPTION_MODE,ie.MSPA_SERVICE_PROVIDER_MODE],Xn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Qn}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(ie.VERSION.toString(),new u(6,Ne.VERSION)),s.put(ie.SHARING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(ie.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(ie.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(ie.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(ie.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(ie.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(ie.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(ie.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(ie.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(ie.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsVaCoreSegment '"+e+"'")}}}])}(G),Dt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Dt.ID}},{key:"getName",value:function(){return Dt.NAME}},{key:"getVersion",value:function(){return Dt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Xn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;ss&&n[s].decode(o[s]);return n}},{key:"encodeSection",value:function(e){for(var n=[],o=0;o=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(X.VERSION.toString(),new u(6,Oe.VERSION)),s.put(X.SHARING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(X.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(X.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(X.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(X.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(X.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0]).withValidator(o)),s.put(X.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(X.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(X.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(X.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsCoCoreSegment '"+e+"'")}}}])}(G),Zn=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return $n}},{key:"initializeFields",value:function(){var e=new k;return e.put(X.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(X.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(X.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsCoGpcSegment '"+e+"'")}}}])}(G),wt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return wt.ID}},{key:"getName",value:function(){return wt.NAME}},{key:"getVersion",value:function(){return wt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Jn),e.push(new Zn),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(X.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(X.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(X.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Oe=wt;N(Oe,"ID",10),N(Oe,"VERSION",1),N(Oe,"NAME","usco");var J;(function(r){r.VERSION="Version",r.SHARING_NOTICE="SharingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(J||(J={}));var ei=[J.VERSION,J.SHARING_NOTICE,J.SALE_OPT_OUT_NOTICE,J.TARGETED_ADVERTISING_OPT_OUT_NOTICE,J.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,J.SALE_OPT_OUT,J.TARGETED_ADVERTISING_OPT_OUT,J.SENSITIVE_DATA_PROCESSING,J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,J.MSPA_COVERED_TRANSACTION,J.MSPA_OPT_OUT_OPTION_MODE,J.MSPA_SERVICE_PROVIDER_MODE],ti=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return ei}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(J.VERSION.toString(),new u(6,Ie.VERSION)),s.put(J.SHARING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(J.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(J.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(J.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(J.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(J.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(J.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(J.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(J.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(J.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(J.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsUtCoreSegment '"+e+"'")}}}])}(G),Vt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Vt.ID}},{key:"getName",value:function(){return Vt.NAME}},{key:"getVersion",value:function(){return Vt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new ti),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;ss&&n[s].decode(o[s]);return n}},{key:"encodeSection",value:function(e){for(var n=[],o=0;o=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(q.VERSION.toString(),new u(6,ve.VERSION)),s.put(q.SHARING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(q.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(q.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(q.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(q.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(q.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(q.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0]).withValidator(o)),s.put(q.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(q.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(q.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsCtCoreSegment '"+e+"'")}}}])}(G),oi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return ii}},{key:"initializeFields",value:function(){var e=new k;return e.put(q.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(q.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(q.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsCtGpcSegment '"+e+"'")}}}])}(G),yt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return yt.ID}},{key:"getName",value:function(){return yt.NAME}},{key:"getVersion",value:function(){return yt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new ri),e.push(new oi),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(q.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(q.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(q.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),ve=yt;N(ve,"ID",12),N(ve,"VERSION",1),N(ve,"NAME","usct");var Z;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"})(Z||(Z={}));var si=[Z.VERSION,Z.PROCESSING_NOTICE,Z.SALE_OPT_OUT_NOTICE,Z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Z.SALE_OPT_OUT,Z.TARGETED_ADVERTISING_OPT_OUT,Z.SENSITIVE_DATA_PROCESSING,Z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Z.ADDITIONAL_DATA_PROCESSING_CONSENT,Z.MSPA_COVERED_TRANSACTION,Z.MSPA_OPT_OUT_OPTION_MODE,Z.MSPA_SERVICE_PROVIDER_MODE],ai=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return si}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(Z.VERSION.toString(),new u(6,fe.VERSION)),s.put(Z.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(Z.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(Z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(Z.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(Z.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(Z.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(Z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0]).withValidator(o)),s.put(Z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(Z.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(Z.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(Z.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsFlCoreSegment '"+e+"'")}}}])}(G),Rt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Rt.ID}},{key:"getName",value:function(){return Rt.NAME}},{key:"getVersion",value:function(){return Rt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new ai),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0)for(var o=e.split("."),s=0;ss&&n[s].decode(o[s]);return n}},{key:"encodeSection",value:function(e){for(var n=[],o=0;o=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(F.VERSION.toString(),new u(6,pe.VERSION)),s.put(F.SHARING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(F.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(F.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(F.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(F.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(F.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(F.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0]).withValidator(o)),s.put(F.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(F.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(F.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(F.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsMtCoreSegment '"+e+"'")}}}])}(G),li=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return ci}},{key:"initializeFields",value:function(){var e=new k;return e.put(F.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(F.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(F.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsMtGpcSegment '"+e+"'")}}}])}(G),mt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return mt.ID}},{key:"getName",value:function(){return mt.NAME}},{key:"getVersion",value:function(){return mt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new di),e.push(new li),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(F.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(F.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),pe=mt;N(pe,"ID",14),N(pe,"VERSION",1),N(pe,"NAME","usmt");var z;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(z||(z={}));var Si=[z.VERSION,z.PROCESSING_NOTICE,z.SALE_OPT_OUT_NOTICE,z.TARGETED_ADVERTISING_OPT_OUT_NOTICE,z.SALE_OPT_OUT,z.TARGETED_ADVERTISING_OPT_OUT,z.SENSITIVE_DATA_PROCESSING,z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,z.ADDITIONAL_DATA_PROCESSING_CONSENT,z.MSPA_COVERED_TRANSACTION,z.MSPA_OPT_OUT_OPTION_MODE,z.MSPA_SERVICE_PROVIDER_MODE],Ei=[z.GPC_SEGMENT_TYPE,z.GPC],hi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Si}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(z.VERSION.toString(),new u(6,Ae.VERSION)),s.put(z.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(z.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(z.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(z.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(z.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(z.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(o)),s.put(z.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0]).withValidator(o)),s.put(z.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(z.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(z.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(z.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsOrCoreSegment '"+e+"'")}}}])}(G),_i=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Ei}},{key:"initializeFields",value:function(){var e=new k;return e.put(z.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(z.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(z.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsOrGpcSegment '"+e+"'")}}}])}(G),Mt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Mt.ID}},{key:"getName",value:function(){return Mt.NAME}},{key:"getVersion",value:function(){return Mt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new hi),e.push(new _i),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(z.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(z.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(z.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Ae=Mt;N(Ae,"ID",15),N(Ae,"VERSION",1),N(Ae,"NAME","usor");var H;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(H||(H={}));var gi=[H.VERSION,H.PROCESSING_NOTICE,H.SALE_OPT_OUT_NOTICE,H.TARGETED_ADVERTISING_OPT_OUT_NOTICE,H.SALE_OPT_OUT,H.TARGETED_ADVERTISING_OPT_OUT,H.SENSITIVE_DATA_PROCESSING,H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,H.ADDITIONAL_DATA_PROCESSING_CONSENT,H.MSPA_COVERED_TRANSACTION,H.MSPA_OPT_OUT_OPTION_MODE,H.MSPA_SERVICE_PROVIDER_MODE],Ti=[H.GPC_SEGMENT_TYPE,H.GPC],Ni=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return gi}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(H.VERSION.toString(),new u(6,Ce.VERSION)),s.put(H.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(H.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(H.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(H.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(H.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(H.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(H.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(H.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(H.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(H.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(H.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsTxCoreSegment '"+e+"'")}}}])}(G),Oi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Ti}},{key:"initializeFields",value:function(){var e=new k;return e.put(H.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(H.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(H.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsTxGpcSegment '"+e+"'")}}}])}(G),Ut=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Ut.ID}},{key:"getName",value:function(){return Ut.NAME}},{key:"getVersion",value:function(){return Ut.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Ni),e.push(new Oi),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(H.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(H.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(H.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Ce=Ut;N(Ce,"ID",16),N(Ce,"VERSION",1),N(Ce,"NAME","ustx");var x;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(x||(x={}));var Ii=[x.VERSION,x.PROCESSING_NOTICE,x.SALE_OPT_OUT_NOTICE,x.TARGETED_ADVERTISING_OPT_OUT_NOTICE,x.SALE_OPT_OUT,x.TARGETED_ADVERTISING_OPT_OUT,x.SENSITIVE_DATA_PROCESSING,x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,x.ADDITIONAL_DATA_PROCESSING_CONSENT,x.MSPA_COVERED_TRANSACTION,x.MSPA_OPT_OUT_OPTION_MODE,x.MSPA_SERVICE_PROVIDER_MODE],vi=[x.GPC_SEGMENT_TYPE,x.GPC],fi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Ii}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(x.VERSION.toString(),new u(6,Pe.VERSION)),s.put(x.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(x.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(x.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(x.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(x.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(x.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0,0]).withValidator(o)),s.put(x.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0,0,0]).withValidator(o)),s.put(x.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(x.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(x.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(x.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsDeCoreSegment '"+e+"'")}}}])}(G),pi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return vi}},{key:"initializeFields",value:function(){var e=new k;return e.put(x.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(x.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(x.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsDeGpcSegment '"+e+"'")}}}])}(G),Gt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Gt.ID}},{key:"getName",value:function(){return Gt.NAME}},{key:"getVersion",value:function(){return Gt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new fi),e.push(new pi),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(x.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(x.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Pe=Gt;N(Pe,"ID",17),N(Pe,"VERSION",1),N(Pe,"NAME","usde");var B;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(B||(B={}));var Ai=[B.VERSION,B.PROCESSING_NOTICE,B.SALE_OPT_OUT_NOTICE,B.TARGETED_ADVERTISING_OPT_OUT_NOTICE,B.SENSITIVE_DATA_OPT_OUT_NOTICE,B.SALE_OPT_OUT,B.TARGETED_ADVERTISING_OPT_OUT,B.SENSITIVE_DATA_PROCESSING,B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,B.MSPA_COVERED_TRANSACTION,B.MSPA_OPT_OUT_OPTION_MODE,B.MSPA_SERVICE_PROVIDER_MODE],Ci=[B.GPC_SEGMENT_TYPE,B.GPC],Pi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Ai}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(B.VERSION.toString(),new u(6,De.VERSION)),s.put(B.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(B.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(B.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(B.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(B.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(B.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(B.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(B.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(B.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(B.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(B.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsIaCoreSegment '"+e+"'")}}}])}(G),Di=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Ci}},{key:"initializeFields",value:function(){var e=new k;return e.put(B.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(B.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(B.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsIaGpcSegment '"+e+"'")}}}])}(G),kt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return kt.ID}},{key:"getName",value:function(){return kt.NAME}},{key:"getVersion",value:function(){return kt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Pi),e.push(new Di),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(B.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(B.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),De=kt;N(De,"ID",18),N(De,"VERSION",1),N(De,"NAME","usia");var j;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(j||(j={}));var wi=[j.VERSION,j.PROCESSING_NOTICE,j.SALE_OPT_OUT_NOTICE,j.TARGETED_ADVERTISING_OPT_OUT_NOTICE,j.SALE_OPT_OUT,j.TARGETED_ADVERTISING_OPT_OUT,j.SENSITIVE_DATA_PROCESSING,j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,j.ADDITIONAL_DATA_PROCESSING_CONSENT,j.MSPA_COVERED_TRANSACTION,j.MSPA_OPT_OUT_OPTION_MODE,j.MSPA_SERVICE_PROVIDER_MODE],Vi=[j.GPC_SEGMENT_TYPE,j.GPC],yi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return wi}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(j.VERSION.toString(),new u(6,we.VERSION)),s.put(j.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(j.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(j.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(j.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(j.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(j.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(j.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(j.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(j.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(j.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(j.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNeCoreSegment '"+e+"'")}}}])}(G),Ri=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Vi}},{key:"initializeFields",value:function(){var e=new k;return e.put(j.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(j.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(j.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNeGpcSegment '"+e+"'")}}}])}(G),bt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return bt.ID}},{key:"getName",value:function(){return bt.NAME}},{key:"getVersion",value:function(){return bt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new yi),e.push(new Ri),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(j.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(j.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(j.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),we=bt;N(we,"ID",19),N(we,"VERSION",1),N(we,"NAME","usne");var K;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(K||(K={}));var mi=[K.VERSION,K.PROCESSING_NOTICE,K.SALE_OPT_OUT_NOTICE,K.TARGETED_ADVERTISING_OPT_OUT_NOTICE,K.SALE_OPT_OUT,K.TARGETED_ADVERTISING_OPT_OUT,K.SENSITIVE_DATA_PROCESSING,K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,K.ADDITIONAL_DATA_PROCESSING_CONSENT,K.MSPA_COVERED_TRANSACTION,K.MSPA_OPT_OUT_OPTION_MODE,K.MSPA_SERVICE_PROVIDER_MODE],Mi=[K.GPC_SEGMENT_TYPE,K.GPC],Ui=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return mi}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(K.VERSION.toString(),new u(6,Ve.VERSION)),s.put(K.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(K.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(K.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(K.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(K.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(K.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(K.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0]).withValidator(o)),s.put(K.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(K.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(K.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(K.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNhCoreSegment '"+e+"'")}}}])}(G),Gi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Mi}},{key:"initializeFields",value:function(){var e=new k;return e.put(K.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(K.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(K.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNhGpcSegment '"+e+"'")}}}])}(G),Lt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Lt.ID}},{key:"getName",value:function(){return Lt.NAME}},{key:"getVersion",value:function(){return Lt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Ui),e.push(new Gi),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(K.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(K.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(K.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Ve=Lt;N(Ve,"ID",20),N(Ve,"VERSION",1),N(Ve,"NAME","usnh");var Y;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(Y||(Y={}));var ki=[Y.VERSION,Y.PROCESSING_NOTICE,Y.SALE_OPT_OUT_NOTICE,Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Y.SALE_OPT_OUT,Y.TARGETED_ADVERTISING_OPT_OUT,Y.SENSITIVE_DATA_PROCESSING,Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Y.ADDITIONAL_DATA_PROCESSING_CONSENT,Y.MSPA_COVERED_TRANSACTION,Y.MSPA_OPT_OUT_OPTION_MODE,Y.MSPA_SERVICE_PROVIDER_MODE],bi=[Y.GPC_SEGMENT_TYPE,Y.GPC],Li=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return ki}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(Y.VERSION.toString(),new u(6,ye.VERSION)),s.put(Y.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(Y.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(Y.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(Y.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(Y.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(Y.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(o)),s.put(Y.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new te(2,[0,0,0,0,0]).withValidator(o)),s.put(Y.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(Y.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(Y.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(Y.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNjCoreSegment '"+e+"'")}}}])}(G),Fi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return bi}},{key:"initializeFields",value:function(){var e=new k;return e.put(Y.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(Y.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(Y.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsNjGpcSegment '"+e+"'")}}}])}(G),Ft=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return Ft.ID}},{key:"getName",value:function(){return Ft.NAME}},{key:"getVersion",value:function(){return Ft.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new Li),e.push(new Fi),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(Y.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(Y.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(Y.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),ye=Ft;N(ye,"ID",21),N(ye,"VERSION",1),N(ye,"NAME","usnj");var W;(function(r){r.VERSION="Version",r.PROCESSING_NOTICE="ProcessingNotice",r.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",r.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",r.SALE_OPT_OUT="SaleOptOut",r.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",r.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",r.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",r.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",r.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",r.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",r.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",r.GPC_SEGMENT_TYPE="GpcSegmentType",r.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",r.GPC="Gpc"})(W||(W={}));var zi=[W.VERSION,W.PROCESSING_NOTICE,W.SALE_OPT_OUT_NOTICE,W.TARGETED_ADVERTISING_OPT_OUT_NOTICE,W.SALE_OPT_OUT,W.TARGETED_ADVERTISING_OPT_OUT,W.SENSITIVE_DATA_PROCESSING,W.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,W.ADDITIONAL_DATA_PROCESSING_CONSENT,W.MSPA_COVERED_TRANSACTION,W.MSPA_OPT_OUT_OPTION_MODE,W.MSPA_SERVICE_PROVIDER_MODE],Hi=[W.GPC_SEGMENT_TYPE,W.GPC],xi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return zi}},{key:"initializeFields",value:function(){var e=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=0&&c<=2}}])}()),n=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){return c>=1&&c<=2}}])}()),o=new(function(){function a(){l(this,a)}return d(a,[{key:"test",value:function(c){for(var I=0;I2)return!1}return!0}}])}()),s=new k;return s.put(W.VERSION.toString(),new u(6,Re.VERSION)),s.put(W.PROCESSING_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(W.SALE_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(W.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new u(2,0).withValidator(e)),s.put(W.SALE_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(W.TARGETED_ADVERTISING_OPT_OUT.toString(),new u(2,0).withValidator(e)),s.put(W.SENSITIVE_DATA_PROCESSING.toString(),new te(2,[0,0,0,0,0,0,0,0]).withValidator(o)),s.put(W.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new u(2,0).withValidator(e)),s.put(W.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new u(2,0).withValidator(e)),s.put(W.MSPA_COVERED_TRANSACTION.toString(),new u(2,1).withValidator(n)),s.put(W.MSPA_OPT_OUT_OPTION_MODE.toString(),new u(2,0).withValidator(e)),s.put(W.MSPA_SERVICE_PROVIDER_MODE.toString(),new u(2,0).withValidator(e)),s}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsTnCoreSegment '"+e+"'")}}}])}(G),Bi=function(r){function i(t){var e;return l(this,i),e=v(this,i),S(p(e),"base64UrlEncoder",U.getInstance()),S(p(e),"bitStringEncoder",m.getInstance()),t&&e.decode(t),e}return f(i,r),d(i,[{key:"getFieldNames",value:function(){return Hi}},{key:"initializeFields",value:function(){var e=new k;return e.put(W.GPC_SEGMENT_TYPE.toString(),new u(2,1)),e.put(W.GPC_SEGMENT_INCLUDED.toString(),new $(!0)),e.put(W.GPC.toString(),new $(!1)),e}},{key:"encodeSegment",value:function(e){var n=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(n)}},{key:"decodeSegment",value:function(e,n){(e==null||e.length===0)&&this.fields.reset(n);try{var o=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(o,this.getFieldNames(),n)}catch(s){throw new _("Unable to decode UsTnGpcSegment '"+e+"'")}}}])}(G),zt=function(r){function i(t){var e;return l(this,i),e=v(this,i),t&&t.length>0&&e.decode(t),e}return f(i,r),d(i,[{key:"getId",value:function(){return zt.ID}},{key:"getName",value:function(){return zt.NAME}},{key:"getVersion",value:function(){return zt.VERSION}},{key:"initializeSegments",value:function(){var e=[];return e.push(new xi),e.push(new Bi),e}},{key:"decodeSection",value:function(e){var n=this.initializeSegments();if(e!=null&&e.length!==0){var o=e.split(".");o.length>0&&n[0].decode(o[0]),o.length>1?(n[1].setFieldValue(W.GPC_SEGMENT_INCLUDED,!0),n[1].decode(o[1])):n[1].setFieldValue(W.GPC_SEGMENT_INCLUDED,!1)}return n}},{key:"encodeSection",value:function(e){var n=[];return e.length>=1&&(n.push(e[0].encode()),e.length>=2&&e[1].getFieldValue(W.GPC_SEGMENT_INCLUDED)===!0&&n.push(e[1].encode())),n.join(".")}}])}(T),Re=zt;N(Re,"ID",22),N(Re,"VERSION",1),N(Re,"NAME","ustn");var re=d(function r(){l(this,r)});N(re,"SECTION_ID_NAME_MAP",new Map([[ce.ID,ce.NAME],[he.ID,he.NAME],[_e.ID,_e.NAME],[ge.ID,ge.NAME],[Te.ID,Te.NAME],[Ne.ID,Ne.NAME],[Oe.ID,Oe.NAME],[Ie.ID,Ie.NAME],[ve.ID,ve.NAME],[fe.ID,fe.NAME],[pe.ID,pe.NAME],[Ae.ID,Ae.NAME],[Ce.ID,Ce.NAME],[Pe.ID,Pe.NAME],[De.ID,De.NAME],[we.ID,we.NAME],[Ve.ID,Ve.NAME],[ye.ID,ye.NAME],[Re.ID,Re.NAME]])),N(re,"SECTION_ORDER",[ce.NAME,he.NAME,_e.NAME,ge.NAME,Te.NAME,Ne.NAME,Oe.NAME,Ie.NAME,ve.NAME,fe.NAME,pe.NAME,Ae.NAME,Ce.NAME,Pe.NAME,De.NAME,we.NAME,Ve.NAME,ye.NAME,Re.NAME]);var dn=function(){function r(i){l(this,r),S(this,"sections",new Map),S(this,"encodedString",null),S(this,"decoded",!0),S(this,"dirty",!1),i&&this.decode(i)}return d(r,[{key:"setFieldValue",value:function(t,e,n){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var o=null;if(this.sections.has(t)?o=this.sections.get(t):t===he.NAME?(o=new he,this.sections.set(he.NAME,o)):t===ce.NAME?(o=new ce,this.sections.set(ce.NAME,o)):t===_e.NAME?(o=new _e,this.sections.set(_e.NAME,o)):t===ge.NAME?(o=new ge,this.sections.set(ge.NAME,o)):t===Te.NAME?(o=new Te,this.sections.set(Te.NAME,o)):t===Ne.NAME?(o=new Ne,this.sections.set(Ne.NAME,o)):t===Oe.NAME?(o=new Oe,this.sections.set(Oe.NAME,o)):t===Ie.NAME?(o=new Ie,this.sections.set(Ie.NAME,o)):t===ve.NAME?(o=new ve,this.sections.set(ve.NAME,o)):t===fe.NAME?(o=new fe,this.sections.set(fe.NAME,o)):t===pe.NAME?(o=new pe,this.sections.set(pe.NAME,o)):t===Ae.NAME?(o=new Ae,this.sections.set(Ae.NAME,o)):t===Ce.NAME?(o=new Ce,this.sections.set(Ce.NAME,o)):t===Pe.NAME?(o=new Pe,this.sections.set(Pe.NAME,o)):t===De.NAME?(o=new De,this.sections.set(De.NAME,o)):t===we.NAME?(o=new we,this.sections.set(we.NAME,o)):t===Ve.NAME?(o=new Ve,this.sections.set(Ve.NAME,o)):t===ye.NAME?(o=new ye,this.sections.set(ye.NAME,o)):t===Re.NAME&&(o=new Re,this.sections.set(Re.NAME,o)),o)o.setFieldValue(e,n),this.dirty=!0,o.setIsDirty(!0);else throw new O(t+"."+e+" not found")}},{key:"setFieldValueBySectionId",value:function(t,e,n){this.setFieldValue(re.SECTION_ID_NAME_MAP.get(t),e,n)}},{key:"getFieldValue",value:function(t,e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)?this.sections.get(t).getFieldValue(e):null}},{key:"getFieldValueBySectionId",value:function(t,e){return this.getFieldValue(re.SECTION_ID_NAME_MAP.get(t),e)}},{key:"hasField",value:function(t,e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)?this.sections.get(t).hasField(e):!1}},{key:"hasFieldBySectionId",value:function(t,e){return this.hasField(re.SECTION_ID_NAME_MAP.get(t),e)}},{key:"hasSection",value:function(t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)}},{key:"hasSectionId",value:function(t){return this.hasSection(re.SECTION_ID_NAME_MAP.get(t))}},{key:"deleteSection",value:function(t){!this.decoded&&this.encodedString!=null&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(t),this.dirty=!0}},{key:"deleteSectionById",value:function(t){this.deleteSection(re.SECTION_ID_NAME_MAP.get(t))}},{key:"clear",value:function(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}},{key:"getHeader",value:function(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var t=new Fe;return t.setFieldValue("SectionIds",this.getSectionIds()),t.toObj()}},{key:"getSection",value:function(t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(t)?this.sections.get(t).toObj():null}},{key:"getSectionIds",value:function(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);for(var t=[],e=0;e=200&&E.status<300){var Qe=E.response;if(typeof Qe=="string")try{Qe=JSON.parse(Qe)}catch(Sn){}s(Qe)}else a(new Error("HTTP Status: ".concat(E.status," response type: ").concat(E.responseType)))},I=function(){a(new Error("error"))},w=function(){a(new Error("aborted"))},b=function(){a(new Error("Timeout "+o+"ms "+t))};E.withCredentials=n,E.addEventListener("load",c),E.addEventListener("error",I),E.addEventListener("abort",w),e===null?E.open("GET",t,!0):E.open("POST",t,!0),E.responseType="json",E.timeout=o,E.ontimeout=b,E.send(e)})}},{key:"post",value:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return this.absCall(t,JSON.stringify(e),n,o)}},{key:"fetch",value:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.absCall(t,null,e,n)}}])}(),Ht=function(r){function i(t){var e;return l(this,i),e=v(this,i,[t]),e.name="GVLError",e}return f(i,r),d(i)}(it(Error)),xt=function(){function r(){l(this,r)}return d(r,[{key:"has",value:function(t){return xt.langSet.has(t)}},{key:"forEach",value:function(t){xt.langSet.forEach(t)}},{key:"size",get:function(){return xt.langSet.size}}])}(),ln=xt;N(ln,"langSet",new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH"]));var Bt=function(){function r(){l(this,r),S(this,"vendors",void 0),S(this,"consentLanguages",new ln),S(this,"gvlSpecificationVersion",void 0),S(this,"vendorListVersion",void 0),S(this,"tcfPolicyVersion",void 0),S(this,"lastUpdated",void 0),S(this,"purposes",void 0),S(this,"specialPurposes",void 0),S(this,"features",void 0),S(this,"specialFeatures",void 0),S(this,"stacks",void 0),S(this,"dataCategories",void 0),S(this,"language",Bt.DEFAULT_LANGUAGE),S(this,"vendorIds",void 0),S(this,"ready",!1),S(this,"fullVendorList",void 0),S(this,"byPurposeVendorMap",void 0),S(this,"bySpecialPurposeVendorMap",void 0),S(this,"byFeatureVendorMap",void 0),S(this,"bySpecialFeatureVendorMap",void 0),S(this,"baseUrl",void 0),S(this,"languageFilename","purposes-[LANG].json")}return d(r,[{key:"changeLanguage",value:function(){var i=Jt(nt().mark(function e(n){var o,s;return nt().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(o=n.toUpperCase(),!this.consentLanguages.has(o)){E.next=18;break}if(o===this.language){E.next=16;break}return this.language=o,s=this.baseUrl+this.languageFilename.replace("[LANG]",n),E.prev=5,E.t0=this,E.next=9,Qt.fetch(s);case 9:E.t1=E.sent,E.t0.populate.call(E.t0,E.t1),E.next=16;break;case 13:throw E.prev=13,E.t2=E.catch(5),new Ht("unable to load language: "+E.t2.message);case 16:E.next=19;break;case 18:throw new Ht("unsupported language ".concat(n));case 19:case"end":return E.stop()}},e,this,[[5,13]])}));function t(e){return i.apply(this,arguments)}return t}()},{key:"getJson",value:function(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}},{key:"isVendorList",value:function(t){return t!==void 0&&t.vendors!==void 0}},{key:"populate",value:function(t){this.purposes=t.purposes,this.specialPurposes=t.specialPurposes,this.features=t.features,this.specialFeatures=t.specialFeatures,this.stacks=t.stacks,this.dataCategories=t.dataCategories,this.isVendorList(t)&&(this.gvlSpecificationVersion=t.gvlSpecificationVersion,this.tcfPolicyVersion=t.tcfPolicyVersion,this.vendorListVersion=t.vendorListVersion,this.lastUpdated=t.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors=t.vendors,this.fullVendorList=t.vendors,this.mapVendors(),this.ready=!0)}},{key:"mapVendors",value:function(t){var e=this;this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(function(n){e.byPurposeVendorMap[n]={legInt:new Set,impCons:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(function(n){e.bySpecialPurposeVendorMap[n]=new Set}),Object.keys(this.features).forEach(function(n){e.byFeatureVendorMap[n]=new Set}),Object.keys(this.specialFeatures).forEach(function(n){e.bySpecialFeatureVendorMap[n]=new Set}),Array.isArray(t)||(t=Object.keys(this.fullVendorList).map(function(n){return+n})),this.vendorIds=new Set(t),this.vendors=t.reduce(function(n,o){var s=e.vendors[String(o)];return s&&s.deletedDate===void 0&&(s.purposes.forEach(function(a){e.byPurposeVendorMap[String(a)].consent.add(o)}),s.specialPurposes.forEach(function(a){e.bySpecialPurposeVendorMap[String(a)].add(o)}),s.legIntPurposes&&s.legIntPurposes.forEach(function(a){e.byPurposeVendorMap[String(a)].legInt.add(o)}),s.impConsPurposes&&s.impConsPurposes.forEach(function(a){e.byPurposeVendorMap[String(a)].impCons.add(o)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(function(a){e.byPurposeVendorMap[String(a)].flexible.add(o)}),s.features.forEach(function(a){e.byFeatureVendorMap[String(a)].add(o)}),s.specialFeatures.forEach(function(a){e.bySpecialFeatureVendorMap[String(a)].add(o)}),n[o]=s),n},{})}},{key:"getFilteredVendors",value:function(t,e,n,o){var s=this,a=t.charAt(0).toUpperCase()+t.slice(1),E,c={};return t==="purpose"&&n?E=this["by"+a+"VendorMap"][String(e)][n]:E=this["by"+(o?"Special":"")+a+"VendorMap"][String(e)],E.forEach(function(I){c[String(I)]=s.vendors[String(I)]}),c}},{key:"getVendorsWithConsentPurpose",value:function(t){return this.getFilteredVendors("purpose",t,"consent")}},{key:"getVendorsWithLegIntPurpose",value:function(t){return this.getFilteredVendors("purpose",t,"legInt")}},{key:"getVendorsWithFlexiblePurpose",value:function(t){return this.getFilteredVendors("purpose",t,"flexible")}},{key:"getVendorsWithSpecialPurpose",value:function(t){return this.getFilteredVendors("purpose",t,void 0,!0)}},{key:"getVendorsWithFeature",value:function(t){return this.getFilteredVendors("feature",t)}},{key:"getVendorsWithSpecialFeature",value:function(t){return this.getFilteredVendors("feature",t,void 0,!0)}},{key:"narrowVendorsTo",value:function(t){this.mapVendors(t)}},{key:"isReady",get:function(){return this.ready}}],[{key:"fromVendorList",value:function(t){var e=new Bt;return e.populate(t),e}},{key:"fromUrl",value:function(){var i=Jt(nt().mark(function e(n){var o,s,a,E,c,I;return nt().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(o=n.baseUrl,!(!o||o.length===0)){b.next=3;break}throw new Ht("Invalid baseUrl: '"+o+"'");case 3:if(!/^https?:\/\/vendorlist\.consensu\.org\//.test(o)){b.next=5;break}throw new Ht("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");case 5:if(o.length>0&&o[o.length-1]!=="/"&&(o+="/"),s=new Bt,s.baseUrl=o,n.languageFilename?s.languageFilename=n.languageFilename:s.languageFilename="purposes-[LANG].json",!(n.version>0)){b.next=18;break}return a=n.versionedFilename,a||(a="archives/vendor-list-v[VERSION].json"),E=o+a.replace("[VERSION]",String(n.version)),b.t0=s,b.next=14,Qt.fetch(E);case 14:b.t1=b.sent,b.t0.populate.call(b.t0,b.t1),b.next=26;break;case 18:return c=n.latestFilename,c||(c="vendor-list.json"),I=o+c,b.t2=s,b.next=24,Qt.fetch(I);case 24:b.t3=b.sent,b.t2.populate.call(b.t2,b.t3);case 26:return b.abrupt("return",s);case 27:case"end":return b.stop()}},e)}));function t(e){return i.apply(this,arguments)}return t}()},{key:"isInstanceOf",value:function(t){return xe(t)=="object"&&typeof t.narrowVendorsTo=="function"}}])}(),Xt=Bt;N(Xt,"DEFAULT_LANGUAGE","EN");var Ki=function(){function r(i,t,e){l(this,r),S(this,"callResponder",void 0),S(this,"cmpApiContext",void 0),this.cmpApiContext=new ji,this.cmpApiContext.cmpId=i,this.cmpApiContext.cmpVersion=t,this.callResponder=new gt(this.cmpApiContext,e)}return d(r,[{key:"fireEvent",value:function(t,e){this.cmpApiContext.eventQueue.exec(t,e)}},{key:"fireErrorEvent",value:function(t){this.cmpApiContext.eventQueue.exec("error",t)}},{key:"fireSectionChange",value:function(t){this.cmpApiContext.eventQueue.exec("sectionChange",t)}},{key:"getEventStatus",value:function(){return this.cmpApiContext.eventStatus}},{key:"setEventStatus",value:function(t){this.cmpApiContext.eventStatus=t}},{key:"getCmpStatus",value:function(){return this.cmpApiContext.cmpStatus}},{key:"setCmpStatus",value:function(t){this.cmpApiContext.cmpStatus=t,this.cmpApiContext.eventQueue.exec("cmpStatus",t)}},{key:"getCmpDisplayStatus",value:function(){return this.cmpApiContext.cmpDisplayStatus}},{key:"setCmpDisplayStatus",value:function(t){this.cmpApiContext.cmpDisplayStatus=t,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",t)}},{key:"getSignalStatus",value:function(){return this.cmpApiContext.signalStatus}},{key:"setSignalStatus",value:function(t){this.cmpApiContext.signalStatus=t,this.cmpApiContext.eventQueue.exec("signalStatus",t)}},{key:"getApplicableSections",value:function(){return this.cmpApiContext.applicableSections}},{key:"setApplicableSections",value:function(t){this.cmpApiContext.applicableSections=t}},{key:"getSupportedAPIs",value:function(){return this.cmpApiContext.supportedAPIs}},{key:"setSupportedAPIs",value:function(t){this.cmpApiContext.supportedAPIs=t}},{key:"setGppString",value:function(t){this.cmpApiContext.gppModel.decode(t)}},{key:"getGppString",value:function(){return this.cmpApiContext.gppModel.encode()}},{key:"setSectionString",value:function(t,e){this.cmpApiContext.gppModel.decodeSection(t,e)}},{key:"setSectionStringById",value:function(t,e){this.setSectionString(re.SECTION_ID_NAME_MAP.get(t),e)}},{key:"getSectionString",value:function(t){return this.cmpApiContext.gppModel.encodeSection(t)}},{key:"getSectionStringById",value:function(t){return this.getSectionString(re.SECTION_ID_NAME_MAP.get(t))}},{key:"setFieldValue",value:function(t,e,n){this.cmpApiContext.gppModel.setFieldValue(t,e,n)}},{key:"setFieldValueBySectionId",value:function(t,e,n){this.setFieldValue(re.SECTION_ID_NAME_MAP.get(t),e,n)}},{key:"getFieldValue",value:function(t,e){return this.cmpApiContext.gppModel.getFieldValue(t,e)}},{key:"getFieldValueBySectionId",value:function(t,e){return this.getFieldValue(re.SECTION_ID_NAME_MAP.get(t),e)}},{key:"getSection",value:function(t){return this.cmpApiContext.gppModel.getSection(t)}},{key:"getSectionById",value:function(t){return this.getSection(re.SECTION_ID_NAME_MAP.get(t))}},{key:"hasSection",value:function(t){return this.cmpApiContext.gppModel.hasSection(t)}},{key:"hasSectionId",value:function(t){return this.hasSection(re.SECTION_ID_NAME_MAP.get(t))}},{key:"deleteSection",value:function(t){this.cmpApiContext.gppModel.deleteSection(t)}},{key:"deleteSectionById",value:function(t){this.deleteSection(re.SECTION_ID_NAME_MAP.get(t))}},{key:"clear",value:function(){this.cmpApiContext.gppModel.clear()}},{key:"getObject",value:function(){return this.cmpApiContext.gppModel.toObject()}},{key:"getGvlFromVendorList",value:function(t){return Xt.fromVendorList(t)}},{key:"getGvlFromUrl",value:function(){var i=Jt(nt().mark(function e(n){return nt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",Xt.fromUrl(n));case 1:case"end":return s.stop()}},e)}));function t(e){return i.apply(this,arguments)}return t}()}])}(),Yi=function(){function r(){l(this,r),this.cmpStatus=$e,this.displayStatus=et}return d(r,[{key:"getCmpApi",value:function(t,e,n){return new Ki(t,e,n)}}])}(),qt=new Yi,Wi={gppCmpApi:qt.getCmpApi,cmpStatus:qt.cmpStatus,displayStatus:qt.displayStatus,signalStatus:Ye};window.otIabModule=ne(Ee({},window.otIabModule),{gppSdkRef:Wi})})();})(); /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */